package com.example.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.example.po.AccountPO;

import java.math.BigDecimal;

/*
@description:
@ClassName AccountService
@author chen
@create 2025-08-26 10:57
@Version 1.0
*/
public interface AccountService extends IService<AccountPO>
{
    /**
     * 转账
     *
     * @param fromAccountId 付款人账户id
     * @param toAccountId   收款人账号id
     * @param transferPrice 转账金额
     */
    void transfer(String fromAccountId, String toAccountId, BigDecimal transferPrice);


    /**
     * 增加账户余额
     *
     * @param accountId
     * @param price
     * @return
     */
    void balanceAdd(String accountId, BigDecimal price);


    /**
     * 减少账户余额
     *
     * @param accountId
     * @param price
     * @return
     */
    void balanceSubtract(String accountId, BigDecimal price);
}
